<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<div class="fixed-plugin">
    <div class="dropdown show-dropdown">
        <a href="#" data-toggle="dropdown">
            <i class="fa fa-cog fa-2x"> </i>
        </a>
       <ul class="dropdown-menu">
            <li class="header-title">个人设置</li>
            <li class="button-container">
                <div>
                    <a href="${ctx}/ui-template/index.jsp" target="_blank" class="btn btn-simple btn-block">UI模板</a>
                </div>
                <div>
                    <a href="${ctx}/pub/doc.jsp" target="_blank" class="btn btn-simple btn-block">接入文档</a>
                </div>
            </li>
           <c:if test="${fns:isAdmin()}">
               <li class="adjustments-line">
                   <a href="javascript:void(0)" class="switch-trigger">
                       <p>开启调试</p>
                       <div class="togglebutton setOpenDebugCheckBox">
                           <label>
                               <input type="checkbox" ${__OPEN_DEBUG eq 'false'?'unchecked':'checked'}>
                           </label>
                       </div>
                       <div class="clearfix"></div>
                   </a>
               </li>
           </c:if>
           <li class="button-container">
               <button class="btn btn-social btn-round btn-info" onclick="javascript:dialogOpenPageView('dd', '${ctx}/adminConsole/page/userProfile')">个人信息</button>
               <button class="btn btn-social btn-round btn-rose" onclick="dialogConfirm('确认退出系统？','${ctx}/adminConsole/login/out','提示', '确定退出', '不，我点错了！')">退出登录</button>
           </li>
           <li class="header-title">技术支持：hsolr@hotmail.com</li>
        </ul>
    </div>
</div>

<c:if test="${fns:isAdmin()}">
    <script type="text/javascript">
        setTimeout(function(){
            $(document).ready(function() {
                $('.setOpenDebugCheckBox input').change(function(){
                    $input = $(this);
                    var isCheck = $(this).is(":checked");
                    log("isCheck:"+isCheck);
                    HttpUtil.ajaxAsyncJsonPost("/adminConsole/superAdmin/setDebug", {isOpenDebug: isCheck}, function(message){
                        dialogAlert(message);
                    });

                });
            });
        }, 1000);
    </script>
</c:if>
